package graphics.transformations;

public interface TriangleLineIntersector {
	/**
	 * Method that tests if a line/ray intersects with a triangle
	 * 
	 * @param triangle
	 *            A triangle, with 3 vertices on
	 *            triangle[0],triangle[1],triangle[2],
	 * @param origin
	 *            The origin of the line.
	 * @param direction
	 *            The direction of the line
	 * @return if the line intersects the triangle NOTE: If called with invalid
	 *         parameters this function has undefined behaviour, from
	 *         nullpointer exceptions to arrayIndex out of bounds triangle
	 *         should be a 3x4 array(3 vertices with 4 coords:x y z 1 ) origin
	 *         is a vertex: float[4], same for direction
	 */
	public boolean intersects(float[][] triangle, float[] origin,
			float[] direction);
}
